package com.wyx.suanfa;

/**
 * @author 王艺锡
 * @version 1.0
 */
public class countNodes {
    //给你一棵 完全二叉树 的根节点 root ，求出该树的节点个数。
    public static void main(String[] args) {

    }
}

/*
* class Solution {
    public int countNodes(TreeNode root) {
        int count = getTreeNum(root);
        return count;

    }
    public int getTreeNum(TreeNode root){
        if(root == null){
            return 0;
        }
        int leftTreeNum = getTreeNum(root.left);
        int rightTreeNum = getTreeNum(root.right);
        return leftTreeNum + rightTreeNum + 1;
    }
}*/
